Optimal. Leaf size=173 \[ \frac {21}{16} a^4 x \sqrt {a^2-b^2 x^2}-\frac {7 a^3 \left (a^2-b^2 x^2\right )^{3/2}}{8 b}-\frac {21 a^2 (a+b x) \left (a^2-b^2 x^2\right )^{3/2}}{40 b}-\frac {3 a (a+b x)^2 \left (a^2-b^2 x^2\right )^{3/2}}{10 b}-\frac {(a+b x)^3 \left (a^2-b^2 x^2\right )^{3/2}}{6 b}+\frac {21 a^6 \tan ^{-1}\left (\frac {b x}{\sqrt {a^2-b^2 x^2}}\right )}{16 b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 173, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 5, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.208, Rules used = {685, 655, 201,
223, 209} \begin {gather*} -\frac {21 a^2 (a+b x) \left (a^2-b^2 x^2\right )^{3/2}}{40 b}-\frac {3 a (a+b x)^2 \left (a^2-b^2 x^2\right )^{3/2}}{10 b}-\frac {(a+b x)^3 \left (a^2-b^2 x^2\right )^{3/2}}{6 b}+\frac {21 a^6 \text {ArcTan}\left (\frac {b x}{\sqrt {a^2-b^2 x^2}}\right )}{16 b}+\frac {21}{16} a^4 x \sqrt {a^2-b^2 x^2}-\frac {7 a^3 \left (a^2-b^2 x^2\right )^{3/2}}{8 b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 201
Rule 209
Rule 223
Rule 655
Rule 685
Rubi steps
\begin {align*} \int (a+b x)^4 \sqrt {a^2-b^2 x^2} \, dx &=-\frac {(a+b x)^3 \left (a^2-b^2 x^2\right )^{3/2}}{6 b}+\frac {1}{2} (3 a) \int (a+b x)^3 \sqrt {a^2-b^2 x^2} \, dx\\ &=-\frac {3 a (a+b x)^2 \left (a^2-b^2 x^2\right )^{3/2}}{10 b}-\frac {(a+b x)^3 \left (a^2-b^2 x^2\right )^{3/2}}{6 b}+\frac {1}{10} \left (21 a^2\right ) \int (a+b x)^2 \sqrt {a^2-b^2 x^2} \, dx\\ &=-\frac {21 a^2 (a+b x) \left (a^2-b^2 x^2\right )^{3/2}}{40 b}-\frac {3 a (a+b x)^2 \left (a^2-b^2 x^2\right )^{3/2}}{10 b}-\frac {(a+b x)^3 \left (a^2-b^2 x^2\right )^{3/2}}{6 b}+\frac {1}{8} \left (21 a^3\right ) \int (a+b x) \sqrt {a^2-b^2 x^2} \, dx\\ &=-\frac {7 a^3 \left (a^2-b^2 x^2\right )^{3/2}}{8 b}-\frac {21 a^2 (a+b x) \left (a^2-b^2 x^2\right )^{3/2}}{40 b}-\frac {3 a (a+b x)^2 \left (a^2-b^2 x^2\right )^{3/2}}{10 b}-\frac {(a+b x)^3 \left (a^2-b^2 x^2\right )^{3/2}}{6 b}+\frac {1}{8} \left (21 a^4\right ) \int \sqrt {a^2-b^2 x^2} \, dx\\ &=\frac {21}{16} a^4 x \sqrt {a^2-b^2 x^2}-\frac {7 a^3 \left (a^2-b^2 x^2\right )^{3/2}}{8 b}-\frac {21 a^2 (a+b x) \left (a^2-b^2 x^2\right )^{3/2}}{40 b}-\frac {3 a (a+b x)^2 \left (a^2-b^2 x^2\right )^{3/2}}{10 b}-\frac {(a+b x)^3 \left (a^2-b^2 x^2\right )^{3/2}}{6 b}+\frac {1}{16} \left (21 a^6\right ) \int \frac {1}{\sqrt {a^2-b^2 x^2}} \, dx\\ &=\frac {21}{16} a^4 x \sqrt {a^2-b^2 x^2}-\frac {7 a^3 \left (a^2-b^2 x^2\right )^{3/2}}{8 b}-\frac {21 a^2 (a+b x) \left (a^2-b^2 x^2\right )^{3/2}}{40 b}-\frac {3 a (a+b x)^2 \left (a^2-b^2 x^2\right )^{3/2}}{10 b}-\frac {(a+b x)^3 \left (a^2-b^2 x^2\right )^{3/2}}{6 b}+\frac {1}{16} \left (21 a^6\right ) \text {Subst}\left (\int \frac {1}{1+b^2 x^2} \, dx,x,\frac {x}{\sqrt {a^2-b^2 x^2}}\right )\\ &=\frac {21}{16} a^4 x \sqrt {a^2-b^2 x^2}-\frac {7 a^3 \left (a^2-b^2 x^2\right )^{3/2}}{8 b}-\frac {21 a^2 (a+b x) \left (a^2-b^2 x^2\right )^{3/2}}{40 b}-\frac {3 a (a+b x)^2 \left (a^2-b^2 x^2\right )^{3/2}}{10 b}-\frac {(a+b x)^3 \left (a^2-b^2 x^2\right )^{3/2}}{6 b}+\frac {21 a^6 \tan ^{-1}\left (\frac {b x}{\sqrt {a^2-b^2 x^2}}\right )}{16 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.30, size = 122, normalized size = 0.71 \begin {gather*} \frac {\sqrt {a^2-b^2 x^2} \left (-448 a^5-75 a^4 b x+256 a^3 b^2 x^2+350 a^2 b^3 x^3+192 a b^4 x^4+40 b^5 x^5\right )}{240 b}-\frac {21 a^6 \log \left (-\sqrt {-b^2} x+\sqrt {a^2-b^2 x^2}\right )}{16 \sqrt {-b^2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(329\) vs.
\(2(149)=298\).
time = 0.46, size = 330, normalized size = 1.91
method | result | size |
risch | \(-\frac {\left (-40 b^{5} x^{5}-192 a \,b^{4} x^{4}-350 a^{2} b^{3} x^{3}-256 a^{3} x^{2} b^{2}+75 a^{4} b x +448 a^{5}\right ) \sqrt {-b^{2} x^{2}+a^{2}}}{240 b}+\frac {21 a^{6} \arctan \left (\frac {\sqrt {b^{2}}\, x}{\sqrt {-b^{2} x^{2}+a^{2}}}\right )}{16 \sqrt {b^{2}}}\) | \(105\) |
default | \(b^{4} \left (-\frac {x^{3} \left (-b^{2} x^{2}+a^{2}\right )^{\frac {3}{2}}}{6 b^{2}}+\frac {a^{2} \left (-\frac {x \left (-b^{2} x^{2}+a^{2}\right )^{\frac {3}{2}}}{4 b^{2}}+\frac {a^{2} \left (\frac {x \sqrt {-b^{2} x^{2}+a^{2}}}{2}+\frac {a^{2} \arctan \left (\frac {\sqrt {b^{2}}\, x}{\sqrt {-b^{2} x^{2}+a^{2}}}\right )}{2 \sqrt {b^{2}}}\right )}{4 b^{2}}\right )}{2 b^{2}}\right )+4 a \,b^{3} \left (-\frac {x^{2} \left (-b^{2} x^{2}+a^{2}\right )^{\frac {3}{2}}}{5 b^{2}}-\frac {2 a^{2} \left (-b^{2} x^{2}+a^{2}\right )^{\frac {3}{2}}}{15 b^{4}}\right )+6 a^{2} b^{2} \left (-\frac {x \left (-b^{2} x^{2}+a^{2}\right )^{\frac {3}{2}}}{4 b^{2}}+\frac {a^{2} \left (\frac {x \sqrt {-b^{2} x^{2}+a^{2}}}{2}+\frac {a^{2} \arctan \left (\frac {\sqrt {b^{2}}\, x}{\sqrt {-b^{2} x^{2}+a^{2}}}\right )}{2 \sqrt {b^{2}}}\right )}{4 b^{2}}\right )-\frac {4 a^{3} \left (-b^{2} x^{2}+a^{2}\right )^{\frac {3}{2}}}{3 b}+a^{4} \left (\frac {x \sqrt {-b^{2} x^{2}+a^{2}}}{2}+\frac {a^{2} \arctan \left (\frac {\sqrt {b^{2}}\, x}{\sqrt {-b^{2} x^{2}+a^{2}}}\right )}{2 \sqrt {b^{2}}}\right )\) | \(330\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.49, size = 121, normalized size = 0.70 \begin {gather*} -\frac {1}{6} \, {\left (-b^{2} x^{2} + a^{2}\right )}^{\frac {3}{2}} b^{2} x^{3} + \frac {21 \, a^{6} \arcsin \left (\frac {b x}{a}\right )}{16 \, b} + \frac {21}{16} \, \sqrt {-b^{2} x^{2} + a^{2}} a^{4} x - \frac {4}{5} \, {\left (-b^{2} x^{2} + a^{2}\right )}^{\frac {3}{2}} a b x^{2} - \frac {13}{8} \, {\left (-b^{2} x^{2} + a^{2}\right )}^{\frac {3}{2}} a^{2} x - \frac {28 \, {\left (-b^{2} x^{2} + a^{2}\right )}^{\frac {3}{2}} a^{3}}{15 \, b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 4.31, size = 106, normalized size = 0.61 \begin {gather*} -\frac {630 \, a^{6} \arctan \left (-\frac {a - \sqrt {-b^{2} x^{2} + a^{2}}}{b x}\right ) - {\left (40 \, b^{5} x^{5} + 192 \, a b^{4} x^{4} + 350 \, a^{2} b^{3} x^{3} + 256 \, a^{3} b^{2} x^{2} - 75 \, a^{4} b x - 448 \, a^{5}\right )} \sqrt {-b^{2} x^{2} + a^{2}}}{240 \, b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [C] Result contains complex when optimal does not.
time = 9.55, size = 700, normalized size = 4.05 \begin {gather*} a^{4} \left (\begin {cases} - \frac {i a^{2} \operatorname {acosh}{\left (\frac {b x}{a} \right )}}{2 b} - \frac {i a x}{2 \sqrt {-1 + \frac {b^{2} x^{2}}{a^{2}}}} + \frac {i b^{2} x^{3}}{2 a \sqrt {-1 + \frac {b^{2} x^{2}}{a^{2}}}} & \text {for}\: \left |{\frac {b^{2} x^{2}}{a^{2}}}\right | > 1 \\\frac {a^{2} \operatorname {asin}{\left (\frac {b x}{a} \right )}}{2 b} + \frac {a x \sqrt {1 - \frac {b^{2} x^{2}}{a^{2}}}}{2} & \text {otherwise} \end {cases}\right ) + 4 a^{3} b \left (\begin {cases} \frac {x^{2} \sqrt {a^{2}}}{2} & \text {for}\: b^{2} = 0 \\- \frac {\left (a^{2} - b^{2} x^{2}\right )^{\frac {3}{2}}}{3 b^{2}} & \text {otherwise} \end {cases}\right ) + 6 a^{2} b^{2} \left (\begin {cases} - \frac {i a^{4} \operatorname {acosh}{\left (\frac {b x}{a} \right )}}{8 b^{3}} + \frac {i a^{3} x}{8 b^{2} \sqrt {-1 + \frac {b^{2} x^{2}}{a^{2}}}} - \frac {3 i a x^{3}}{8 \sqrt {-1 + \frac {b^{2} x^{2}}{a^{2}}}} + \frac {i b^{2} x^{5}}{4 a \sqrt {-1 + \frac {b^{2} x^{2}}{a^{2}}}} & \text {for}\: \left |{\frac {b^{2} x^{2}}{a^{2}}}\right | > 1 \\\frac {a^{4} \operatorname {asin}{\left (\frac {b x}{a} \right )}}{8 b^{3}} - \frac {a^{3} x}{8 b^{2} \sqrt {1 - \frac {b^{2} x^{2}}{a^{2}}}} + \frac {3 a x^{3}}{8 \sqrt {1 - \frac {b^{2} x^{2}}{a^{2}}}} - \frac {b^{2} x^{5}}{4 a \sqrt {1 - \frac {b^{2} x^{2}}{a^{2}}}} & \text {otherwise} \end {cases}\right ) + 4 a b^{3} \left (\begin {cases} - \frac {2 a^{4} \sqrt {a^{2} - b^{2} x^{2}}}{15 b^{4}} - \frac {a^{2} x^{2} \sqrt {a^{2} - b^{2} x^{2}}}{15 b^{2}} + \frac {x^{4} \sqrt {a^{2} - b^{2} x^{2}}}{5} & \text {for}\: b \neq 0 \\\frac {x^{4} \sqrt {a^{2}}}{4} & \text {otherwise} \end {cases}\right ) + b^{4} \left (\begin {cases} - \frac {i a^{6} \operatorname {acosh}{\left (\frac {b x}{a} \right )}}{16 b^{5}} + \frac {i a^{5} x}{16 b^{4} \sqrt {-1 + \frac {b^{2} x^{2}}{a^{2}}}} - \frac {i a^{3} x^{3}}{48 b^{2} \sqrt {-1 + \frac {b^{2} x^{2}}{a^{2}}}} - \frac {5 i a x^{5}}{24 \sqrt {-1 + \frac {b^{2} x^{2}}{a^{2}}}} + \frac {i b^{2} x^{7}}{6 a \sqrt {-1 + \frac {b^{2} x^{2}}{a^{2}}}} & \text {for}\: \left |{\frac {b^{2} x^{2}}{a^{2}}}\right | > 1 \\\frac {a^{6} \operatorname {asin}{\left (\frac {b x}{a} \right )}}{16 b^{5}} - \frac {a^{5} x}{16 b^{4} \sqrt {1 - \frac {b^{2} x^{2}}{a^{2}}}} + \frac {a^{3} x^{3}}{48 b^{2} \sqrt {1 - \frac {b^{2} x^{2}}{a^{2}}}} + \frac {5 a x^{5}}{24 \sqrt {1 - \frac {b^{2} x^{2}}{a^{2}}}} - \frac {b^{2} x^{7}}{6 a \sqrt {1 - \frac {b^{2} x^{2}}{a^{2}}}} & \text {otherwise} \end {cases}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.84, size = 91, normalized size = 0.53 \begin {gather*} \frac {21 \, a^{6} \arcsin \left (\frac {b x}{a}\right ) \mathrm {sgn}\left (a\right ) \mathrm {sgn}\left (b\right )}{16 \, {\left | b \right |}} - \frac {1}{240} \, {\left (\frac {448 \, a^{5}}{b} + {\left (75 \, a^{4} - 2 \, {\left (128 \, a^{3} b + {\left (175 \, a^{2} b^{2} + 4 \, {\left (5 \, b^{4} x + 24 \, a b^{3}\right )} x\right )} x\right )} x\right )} x\right )} \sqrt {-b^{2} x^{2} + a^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \sqrt {a^2-b^2\,x^2}\,{\left (a+b\,x\right )}^4 \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________